<?php
import("@.Validator.Validator");

class OrganizationValidator extends Validator
{
    private static $createOrgRules = array(
        //array('creator_user_id', 'require', 'userId is null'), //UserId是否为空检测
        array('org_name', 'require', 'orgName is null'), //orgName是否为空检测
        //array('org_desc', 'require', 'orgDesc is null'), //orgDesc是否为空检测
        array('org_type', 'require', 'orgType is null'), //orgType是否为空检测
        array('org_name', 'checkOrgName', 'orgName pattern not right', Model::EXISTS_VALIDATE, 'callback', Model::MODEL_BOTH),//orgName格式检测
        array('org_desc', 'checkOrgDesc', 'orgDesc pattern not right', Model::VALUE_VALIDATE, 'callback', Model::MODEL_BOTH),//orgDesc格式检测
        array('org_type', 'checkOrgType', 'orgType pattern not right', Model::EXISTS_VALIDATE, 'callback', Model::MODEL_BOTH),//orgType格式检测
    );

    public static function getCreateOrgRules()
    {
        return OrganizationValidator::$createOrgRules;
    }
}

?>